<div class="general-style">
	<h1 id="faq">
		Frequently Asked Questions
	</h1>

	<p>
		While the other sections of this documentation covers everything you need
		to know to start using HashOver on your website, some information didn't
		fit into the other sections nicely. Here is some more information in the form
		of answers to common questions. If you have any questions please feel free to
		<a href="https://www.barkdull.org/contact" target="_blank">contact me on my website</a>.
		Also feel free to edit this file on
		<a href="https://github.com/jacobwb/hashover-next" target="_blank">GitHub</a>,
		by adding your question and submitting a pull request, I will merge the pull
		request along with an answer to the question.
	</p>

	<h2 id="html-in-comments">
		What HTML does HashOver allow in comments?
	</h2>

	<p>
		Users may post comments with a limited number of HTML tags. These tags
		include <code>&lt;b&gt;</code>, <code>&lt;em&gt;</code>,
		<code>&lt;u&gt;</code>, <code>&lt;i&gt;</code>, <code>&lt;s&gt;</code>,
		<code>&lt;big&gt;</code>, <code>&lt;small&gt;</code>,
		<code>&lt;strong&gt;</code>, <code>&lt;sub&gt;</code>,
		<code>&lt;sup&gt;</code>, <code>&lt;pre&gt;</code>,
		<code>&lt;ul&gt;</code>, <code>&lt;ol&gt;</code>,
		<code>&lt;li&gt;</code>, <code>&lt;blockquote&gt;</code>, and
		<code>&lt;code&gt;</code> escapes HTML.
	</p>

	<p>
		Users may also include an image in their posts using
		<code>[img]https://example.com/image.jpg[/img]</code>. Images in comments
		are not shown by default, they appear as a Polaroid-esque icon, which
		must be clicked for the image to be shown.
	</p>

	<p>
		All other HTML in a comment will be escaped. The allowed HTML tags are
		case insensitive, but they must appear exactly as stated, no attributes
		or odd spacing, otherwise they too will be escaped. The hyperlink tag
		<code>&lt;a&gt;</code> is not allowed in comments, instead users can post
		URLs as-is and they will become links. This is done to help protect users
		against scams and SPAM, since links can't say something different than
		where they actually link to, thereby preventing phishing attacks.
	</p>

	<h2 id="markdown-in-comments">
		Does HashOver support Markdown in comments?
	</h2>

	<p>
		Yes, HashOver supports a limited type of Markdown. The syntax is:
		<code>**bold**</code>, <code>_underline_</code>, <code>*italic*</code>,
		<code>~~strikethrough~~</code>, <code>`highlight`</code>, and
		<code>```code```</code> escapes HTML. Additionally, <code>__bold__</code>
		will force the underline styling and allow it to span multiple lines.
		Markdown support will always remain limited, it will never support the
		<code>[]()</code> hyperlink syntax, but all of the allowed HTML tags will
		eventually be supported as Markdown at least. HTML and Markdown may be
		used together in comments.
	</p>

	<h2 id="email-notifications-not-sent">
		Why am I not being sent email notifications?
	</h2>

	<p>
		Before assuming HashOver is not sending email notifications, you should
		first confirm that you are supposed to be receiving email notifications
		about the comments being posted in the first place, as HashOver does not
		send email notifications under some specific circumstances.
	</p>

	<p>
		Email notifications are not sent when either of the following is true:
	</p>

	<ol>
		<li>
			<p>
				A comment is posted with the same email address as the
				notification email address. That is, the
				<code><a href="../setup/#required-setup">$notificationEmail</a></code> setting.
			</p>

			<p>
				This is done to prevent the admin from being sent
				notification emails about comments they themselves posted.
				In the same way as a normal user does not receive email
				notifications about the comment they posted on your website,
				neither should the admin receive email notifications about
				comments they post on their own website. This is especially
				useful in testing HashOver, as it allows you to post test
				comments without receiving email notifications.
			</p>
		</li>
		<li>
			<p>
				A reply is posted with the same email address as the comment
				being replied to.
			</p>

			<p>
				This is done to prevent normal users from being sent email
				notifications when they reply to themselves. The admin will
				receive an email notification in this case, as long as the
				user posting the reply is not the admin.
			</p>
		</li>
	</ol>

	<p>
		It is common for people testing HashOver to post comments using the
		notification email address, in which case HashOver is not sending email
		notifications. Ensure you are not doing this before assuming email
		notifications are not working.
	</p>

	<p>
		There are multiple reasons why you may not be receiving email
		notifications: Hosting providers not allowing email to be sent from
		their servers, ISPs blocking port 25 or otherwise restricting email
		support, your email provider marking the notifications as junk or SPAM,
		and/or incorrect server configurations. Any one of these things can
		cause the email notifications to not be sent, received, or both.
	</p>

	<p>
		If you are using a hosting provider with cPanel, you should be able to
		see what email has been sent and received by the server by going to the
		"Track Delivery" page under the "Email" section, from there you should
		be able to see if the email notifications were rejected and why. If you
		are not using cPanel, you can find useful information in the
		<code>/var/log/mail.log</code> or <code>/var/log/mail.err</code> files (these
		files are located in different places depending on what operating system
		you're using) or by checking the mail for the <code>www-data</code> user.
	</p>

	<p>
		You should test whether you can send email from your server at all. You
		can do this at the command line with:
	</p>

	<div class="code block">
		echo 'Test' | sendmail example@example.com
	</div>

	<p>
		Or via PHP with the following code in a PHP file:
	</p>

	<div class="code block">
		&lt;?php<br/><br/>

		&nbsp; &nbsp; mail ('example@example.com', 'Test', 'Test');<br/><br/>

		?&gt;
	</div>

	<p>
		Change out "example@example.com" for the email address you're using in the
		<code>$notificationEmail</code> setting.
	</p>

	<p>
		If you cannot send email using
		these examples, your hosting provider or ISP is preventing you from sending
		email from the server. Fixing that problem is outside the scope of this
		documentation. You might consider <a href="../setup/#smtp-setup">using SMTP</a>
		to send the email notifications instead.
	</p>

	<p>
		If you can send email using these examples or other software on your website
		is able to send email, but HashOver is not sending email notifications,
		please report it as a bug to me either by <a href="https://www.barkdull.org/contact" target="_blank">email</a>
		or on <a href="https://github.com/jacobwb/hashover-next" target="_blank">GitHub</a>.
	</p>
</div>
